program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  n, i, j, s, t: integer;
  mass: array of integer;
  fin, fout: textFile;
begin
  assignFile(fin, 'input.txt');
  assignFile(fout, 'output.txt');
  reset(fin);
  rewrite(fout);
  readln(fin, n);
  setlength(mass, n);
  for i:= 0 to n-1 do
  begin
    readln(fin, mass[i])
  end;
  for j:= 0 to n-1 do
  begin
    s := j;
    for i:= j+1 to n-1 do
    begin
      if (mass[i] >= mass[s]) then
        s:=i;
      t:= mass[j];
      mass[j]:= mass[s];
      mass[s]:=t;
    end;
  end;
  for i:= 0 to n-1 do
  begin
    writeln(fout, mass[i])
  end;
  closeFile(fin);
  closeFile(fout);
end.
